package com.cmos.um.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Feng Yu
 * @version V1.0
 * @date 2017-06-07
 */
@Component
public class WSContent {

    private final static Logger logger = LoggerFactory.getLogger(WSContent.class);

    public static final String _SAVE = "0";
    public static final String _DELETE = "1";
    public static final String _UPDATE = "2";
    public static final String _OTHER = "3";
    public static final String _ANOTHER = "4";

    public static final String _DEF_VALUE = "0";
    public static final String _TRUE = "true";

    public static String companyNo;
    public static String servUrl;
    public static String vccUrl;
    public static String memUrl;

    public static String agentUrl; //坐席

    public static String extension;     //分机
    public static String localPath;
    public static String uploadUrl;

    //话单查询接口UC获取smpip
    public static String smpUrl;

    @Value("${callRecord.smpUrl}")
    public void setSmpUrl(String smpUrl) {
        WSContent.smpUrl = smpUrl;
    }

    //ngmmt提供的满意度csf编码
    public static String csfUserSatisfy;

    //ngoc提供的修改任务状态的csf编码
    public static String csfTaskStatus;

    @Value("${csf.csfTaskStatus}")
    public void setCsfTaskStatus(String csfTaskStatus) {
        WSContent.csfTaskStatus = csfTaskStatus;
    }

    @Value("${csf.csfUserSatisfy}")
    public void setCsfUserSatisfy(String csfUserSatisfy) {
        WSContent.csfUserSatisfy = csfUserSatisfy;
    }

    @Value("${cti.companyNo}")
    public void setCompanyNo(String companyNo) {
        logger.info("企业号已初始化为：" + companyNo);
        WSContent.companyNo = companyNo;
    }

    @Value("${ctiJsonServ.servUrl}")
    public void setServUrl(String servUrl) {
        WSContent.servUrl = servUrl;
    }

    @Value("${ctiJsonVcc.vccUrl}")
    public void setVccUrl(String vccUrl) {
        WSContent.vccUrl = vccUrl;
    }

    @Value("${ctiJsonMem.memUrl}")
    public void setMemUrl(String memUrl) {
        WSContent.memUrl = memUrl;
    }

    @Value("${ctiJsonAgent.agentUrl}")
    public void setAgentUrl(String agentUrl) {
        WSContent.agentUrl = agentUrl;
    }

    @Value("${ctiJsonExtension.extensionUrl}")
    public void setExtension(String extension) {
        WSContent.extension = extension;
    }

    @Value("${file.localPath}")
    public void setLocalPath(String localPath) {
        WSContent.localPath = localPath;
    }

    @Value("${cti.uploadUrl}")
    public void setUploadUrl(String uploadUrl) {
        WSContent.uploadUrl = uploadUrl;
    }
}
